package com.paic.mhis.hcpms.common.base.dto;

import java.util.HashMap;
import java.util.Map;

/**
 * 分页
 * 
 * @author YUAIJUN273
 * 
 */
public class PaginationDTO extends BaseDTO {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public PaginationDTO() {

	}

	public PaginationDTO(int page, int pageSize) {
		this.page = page;
		this.pageSize = pageSize;
	}

	private String state;

	private String msg;

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;			
	}

	// 总记录数
	private int total = 20;
	// 当前页面
	private int page = 1;
	// 每页记录数
	private int pageSize = 20;
	// 记录开始（包含）
	private int start = 0;
	// 记录结束（不包含）
	private int end = 20;
	private int limit = 20;
	// 查询条件
	private Map<Object, Object> queryParams = new HashMap<Object, Object>();
	// 是否查询总数
	private Boolean doCount;
	// 是否查询所有记录
	private Boolean queryAll;

	public void addParam(String paramName, Object paramValue) {
		this.queryParams.put(paramName, paramValue);
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getEnd() {
		return end;
	}

	public void setEnd(int end) {
		this.end = end;
	}

	public Map<Object, Object> getQueryParams() {
		return queryParams;
	}

	public void setQueryParams(Map<Object, Object> queryParams) {
		this.queryParams = queryParams;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Boolean getDoCount() {
		return doCount;
	}

	public void setDoCount(Boolean doCount) {
		this.doCount = doCount;
	}

	public Boolean getQueryAll() {
		return queryAll;
	}

	public void setQueryAll(Boolean queryAll) {
		this.queryAll = queryAll;
	}

	@Override
	public String toString() {
		return "PaginationDTO [result=" + state + ", msg=" + msg + ", total=" + total + ", page=" + page
				+ ", pageSize=" + pageSize + ", start=" + start + ", end=" + end + ", queryParams=" + queryParams + "]";
	}

}
